/**
 * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package com.crossriver.crgis.database.model;

import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler;
import com.liferay.portal.kernel.util.StringBundler;
import com.liferay.portal.model.impl.BaseModelImpl;

import java.io.Serializable;

import java.lang.reflect.Proxy;

/**
 * @author Wole Adetiba
 */
public class Held_PlotsClp extends BaseModelImpl<Held_Plots>
	implements Held_Plots {
	public Held_PlotsClp() {
	}

	public String getPrimaryKey() {
		return _held_id;
	}

	public void setPrimaryKey(String pk) {
		setHeld_id(pk);
	}

	public Serializable getPrimaryKeyObj() {
		return _held_id;
	}

	public String getHeld_id() {
		return _held_id;
	}

	public void setHeld_id(String held_id) {
		_held_id = held_id;
	}

	public String getUserId() {
		return _userId;
	}

	public void setUserId(String userId) {
		_userId = userId;
	}

	public String getApplicationId() {
		return _applicationId;
	}

	public void setApplicationId(String applicationId) {
		_applicationId = applicationId;
	}

	public String getLocation() {
		return _location;
	}

	public void setLocation(String location) {
		_location = location;
	}

	public String getArea() {
		return _area;
	}

	public void setArea(String area) {
		_area = area;
	}

	public String getDeveloped() {
		return _developed;
	}

	public void setDeveloped(String developed) {
		_developed = developed;
	}

	public String getAcquisitionMode() {
		return _acquisitionMode;
	}

	public void setAcquisitionMode(String acquisitionMode) {
		_acquisitionMode = acquisitionMode;
	}

	public String getRegParticulars() {
		return _regParticulars;
	}

	public void setRegParticulars(String regParticulars) {
		_regParticulars = regParticulars;
	}

	public Held_Plots toEscapedModel() {
		if (isEscapedModel()) {
			return this;
		}
		else {
			return (Held_Plots)Proxy.newProxyInstance(Held_Plots.class.getClassLoader(),
				new Class[] { Held_Plots.class },
				new AutoEscapeBeanHandler(this));
		}
	}

	public Object clone() {
		Held_PlotsClp clone = new Held_PlotsClp();

		clone.setHeld_id(getHeld_id());
		clone.setUserId(getUserId());
		clone.setApplicationId(getApplicationId());
		clone.setLocation(getLocation());
		clone.setArea(getArea());
		clone.setDeveloped(getDeveloped());
		clone.setAcquisitionMode(getAcquisitionMode());
		clone.setRegParticulars(getRegParticulars());

		return clone;
	}

	public int compareTo(Held_Plots held_Plots) {
		int value = 0;

		value = getHeld_id().compareTo(held_Plots.getHeld_id());

		if (value != 0) {
			return value;
		}

		return 0;
	}

	public boolean equals(Object obj) {
		if (obj == null) {
			return false;
		}

		Held_PlotsClp held_Plots = null;

		try {
			held_Plots = (Held_PlotsClp)obj;
		}
		catch (ClassCastException cce) {
			return false;
		}

		String pk = held_Plots.getPrimaryKey();

		if (getPrimaryKey().equals(pk)) {
			return true;
		}
		else {
			return false;
		}
	}

	public int hashCode() {
		return getPrimaryKey().hashCode();
	}

	public String toString() {
		StringBundler sb = new StringBundler(17);

		sb.append("{held_id=");
		sb.append(getHeld_id());
		sb.append(", userId=");
		sb.append(getUserId());
		sb.append(", applicationId=");
		sb.append(getApplicationId());
		sb.append(", location=");
		sb.append(getLocation());
		sb.append(", area=");
		sb.append(getArea());
		sb.append(", developed=");
		sb.append(getDeveloped());
		sb.append(", acquisitionMode=");
		sb.append(getAcquisitionMode());
		sb.append(", regParticulars=");
		sb.append(getRegParticulars());
		sb.append("}");

		return sb.toString();
	}

	public String toXmlString() {
		StringBundler sb = new StringBundler(28);

		sb.append("<model><model-name>");
		sb.append("com.crossriver.crgis.database.model.Held_Plots");
		sb.append("</model-name>");

		sb.append(
			"<column><column-name>held_id</column-name><column-value><![CDATA[");
		sb.append(getHeld_id());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>userId</column-name><column-value><![CDATA[");
		sb.append(getUserId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>applicationId</column-name><column-value><![CDATA[");
		sb.append(getApplicationId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>location</column-name><column-value><![CDATA[");
		sb.append(getLocation());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>area</column-name><column-value><![CDATA[");
		sb.append(getArea());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>developed</column-name><column-value><![CDATA[");
		sb.append(getDeveloped());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>acquisitionMode</column-name><column-value><![CDATA[");
		sb.append(getAcquisitionMode());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>regParticulars</column-name><column-value><![CDATA[");
		sb.append(getRegParticulars());
		sb.append("]]></column-value></column>");

		sb.append("</model>");

		return sb.toString();
	}

	private String _held_id;
	private String _userId;
	private String _applicationId;
	private String _location;
	private String _area;
	private String _developed;
	private String _acquisitionMode;
	private String _regParticulars;
}